#pragma once
#include <string>
#include <fstream>
class FileTool {
public:

	FileTool() {}
	~FileTool();
	void SetFileName(std::string file,bool readOrWrite=true);
	void WriteString(std::string data);
	void WriteFloat(float f);

	void WriteInt(int n);
	void WritePoint(float x,float y);
	void WriteNewLine();

	void ReadString(std::string& src);
	void ReadFloat(float& fv);
	float  ReadFloat();
	void ReadInt(int& fv);
	int ReadInt();
	void ReadPoint(float& fx,float& fy);

	FILE* f;
	std::ofstream ofs;
	std::ifstream ifs;

};